package cn.doitedu.rtdw.data_sync;

import ch.hsr.geohash.GeoHash;
import org.apache.flink.table.functions.ScalarFunction;

public class Gps2GeoHashUdf extends ScalarFunction {
    public String eval(Double lng,Double lat){
        String geohash = null;

        try {
            geohash = GeoHash.geoHashStringWithCharacterPrecision(lat, lng, 6);
        }catch (Exception e){
            e.printStackTrace();
        }
        return geohash;
    };

}
